import request from '/@/utils/request';
/**
 * 系统详情
 * @param code 
 * @returns 
 */
export function sysInfo() {
	return request({
		url: import.meta.env.VITE_APP_BASE_API+'/visitor/sysInfo',
		method: 'get'
	});
}
/**
 * 获取验证码
 * @param code 
 * @returns 
 */
export function captcha(code: string) {
	return request({
		url: import.meta.env.VITE_APP_BASE_API+'/visitor/' + code,
		method: 'get'
	});
}

/**
 * 登录
 * @param params 
 * @returns 
 */
export function login(params: object) {
	return request({
		url: import.meta.env.VITE_APP_BASE_API+'/auth/login',
		method: 'post',
		data: params
	});
}


/**
 * 退出登录
 * @param params 
 * @returns 
 */
export function logout( ) {
	return request({
		url: import.meta.env.VITE_APP_BASE_API+'/auth/logout',
		method: 'post'
	});
}
